package edu.sctu.practice.class01.zhangwang.assigns.assign03.question_02;

import java.util.Objects;

/**
 * Created by Z_W on 2015/10/22.
 */
public class ComparableCirle extends Circle implements Comparable {
    private final double PI = 3.14;
    public int areas = 0;

    public ComparableCirle(int r) {
        super(r);
    }

    @Override
    public int compareTo(Objects o) {
        areas = (int) PI * r * r;
        System.out.println("圆的面积为：" + areas);
        return areas;
    }
}
